package com.appspot.itunegwt.client.mvp;

import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.ProxyStandard;
import com.gwtplatform.mvp.client.annotations.NameToken;
import com.appspot.itunegwt.client.place.NameTokens;
import com.gwtplatform.mvp.client.proxy.ProxyPlace;
import com.google.inject.Inject;
import com.google.gwt.event.shared.EventBus;
import com.gwtplatform.mvp.client.proxy.RevealContentEvent;
import com.appspot.itunegwt.client.layout.AppPresenter;

public class DefaultPresenter extends
		Presenter<DefaultPresenter.MyView, DefaultPresenter.MyProxy> {

	public interface MyView extends View {
		public void addTask(String task_name, String completionTime, String author,
				String skillLearned, String difficulty, String isDone);
		public void sortColumn();
		public void createCellTable();
	}

	@ProxyStandard
	@NameToken(NameTokens.index)
	public interface MyProxy extends ProxyPlace<DefaultPresenter> {
	}

	@Inject
	public DefaultPresenter(final EventBus eventBus, final MyView view,
			final MyProxy proxy) {
		super(eventBus, view, proxy);
	}

	@Override
	protected void revealInParent() {
		RevealContentEvent.fire(this, AppPresenter.TYPE_SetMainContent, this);
	}
}
